<?php
require_once ROOT_PATH.'mobiapi/request/base.req.php';

class MobiRequest extends BaseRequest
{
	var $id;
	
	var $title;
	var $content;
	var $location;
	
	var $music_name;
	var $music_author;
	
	var $image1;
	var $image2;
	var $image3;
	var $url;
	
	function __construct($request)
	{
		parent::__construct($request);

		//var_dump('---Story info request ---', $request);
		
		$this->id = isset($request['id']) ? $request['id'] : '';
		
		$this->title = isset($request['title']) ? $request['title'] : '';
		$this->content = isset($request['content']) ? $request['content'] : '';
		$this->location = isset($request['location']) ? $request['location'] : '';
		
		$this->music_name = isset($request['music_name']) ? $request['music_name'] : '';
		$this->music_author = isset($request['music_author']) ? $request['music_author'] : '';
		
		$this->image1 = isset($request['image1']) ? $request['image1'] : '';
		$this->image2 = isset($request['image2']) ? $request['image2'] : '';
		$this->image3 = isset($request['image3']) ? $request['image3'] : '';
		$this->url = isset($request['url']) ? $request['url'] : '';
	}
	
	function is_valid()
	{
		return ($this->title != '' && $this->content != '');
	}
}